home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 41.zip / BS1 part 41 / Abacus diskdrives IO.adf / CH5 / directory.s < prev    next >
Text File  |  1978-06-28  |  2KB  |  12 lines

  1. Lock      = -84Examine   = -102ExNext    = -108
  2. IoErr     = -132;     ...                     ; subroutine not complete need Print routine and initialization
  3. directory;:                   ;* Table of Content of DF0:
  4.      move.l  dosbase,a6       ;DOS-Base address in A6
  5.      move.l  #name,d1         ;pointer to Path-/Filename      move.l  #-2,d2              ;Mode "Read"     jsr     Lock(a6)         ;search for file      tst.l   d0               ;found ?     beq     Error            ;no !     move.l  d0,locksav       ;otherwise save key      move.l  dosbase,a6       ;DOS-Base address     move.l  locksav,d1       ;Key in D1     move.l  #fileinfo,d2     ;pointer to FileInfoBlock     jsr     Examine(a6)      ;Get Disk-Name      tst.l   d0               ;OK?     beq     error            ;no (occurs rarely)     bra     output         ;otherwise output Name loop:                         ;* Read Filenames      move.l  dosbase,a6       ;DOS-Base address     move.l  locksav,d1       ;Key in D1     move.l  #fileinfo,d2     ;pointer to FileInfoBlock     jsr     ExNext(a6)       ;search for next file      tst.l   d0               ;found ?     beq     error            ;no: Endoutput:                       ;* Output Name
  6.      bsr     Print            ;Output/evaluate Name etc.      bra     loop             ;and continue ...error:                        ;* Determine I/O-Status      move.l  dosbase,a6       ;DOS-Base address in A6     jsr     IoErr(a6)        ;Get Status      rts                      ;End...name:     dc.b  'DF0:',0 align                        ; some assemblers use even
  7. locksav:  blk.l   0fileinfo: blk.l 260
  8.  
  9.  
  10.  end
  11.  
  12.